package book;

public class Book {
    private String name;
    private String man;
    private int price;
    private String type;
    private boolean isborrow;//默认为false

    public Book(String name, String man, int price, String type) {
        this.name = name;
        this.man = man;
        this.price = price;
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setIsborrow(boolean isborrow) {
        this.isborrow = isborrow;
    }

    public boolean getisIsborrow() {
        return isborrow;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", man='" + man + '\'' +
                ", price=" + price +
                ", type='" + type + '\'' +
                ((isborrow == true) ? "    借出去了" : "    没借出去") +
                '}';
    }
}
